<?php
    \defined( '_JEXEC' ) or die( 'Restricted access' );
?>

<div class="row">
    <div class="col-md-6 col-md-offset-3">
      <div class="well">
        <legend>Login to <?php echo juven\libs\juven::config()->siteTitle; ?></legend>
        <form id="login_form" method="POST" action="" accept-charset="UTF-8" role="form">
            <?php if (isset($this->error_msg)){?>
                <div class="alert alert-dismissable alert-danger">
                  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                  <strong>Warning!</strong> <?php echo $this->error_msg; ?>
                </div>
            <?php }?>
            <div class="form-group<?php if (isset($this->error_msg)){ echo " has-error";} ?>">
                <input class="form-control" 
                    <?php 
                       if (isset($this->error_msg)){ 
                           echo "value=\"".juven\libs\Tools::stripIllegalCharsFromUsername(isset($_POST["username"])?$_POST["username"]:"")."\""; 
                       }    
                     ?> placeholder="Username" type="text" name="username" tabindex="1" autofocus maxlength="<?php echo juven\libs\juven::config()->Login->username_maxLength; ?>">
            </div>
            <input class="form-control" placeholder="Password" type="password" name="password" tabindex="2" maxlength="<?php echo juven\libs\juven::config()->Login->password_maxLength; ?>">
            <?php if (juven\libs\juven::config()->Login->remember_user==\TRUE) { ?>
                <div class="checkbox">
                    <label>
                      <input type="checkbox" name="remember" value="1"> Remember Me
                    </label>
                </div>
            <?php }?>
            <br /><a class="pull-right" rel="nofollow" href="">Forgot your password?</a>
            <input type="hidden" id="someRandomID_01" name="someRandomName_01" value="someRandomValue" autocomplete="off" />
            <button class="btn-info btn" type="submit" tabindex="3">Login</button>      
        </form>    
      </div>
    </div>
</div>
